package org.huawei260.TiKu.ODsuanfa;

import java.util.Arrays;
import java.util.LinkedList;
import java.util.Scanner;
public class E_2024E_2812__哈希表免单统计 {

//	public class Main {
		// 输入获取
		public static void main(String[] args) {
			Scanner sc = new Scanner(System.in);

			int n = Integer.parseInt(sc.nextLine());

			String[] arr = new String[n];
			for (int i = 0; i < n; i++) {
				arr[i] = sc.nextLine();
			}

			System.out.println(getResult(arr));
		}

		// 算法入口
		public static int getResult(String[] arr) {
			Arrays.sort(arr);

			LinkedList<String> stack = new LinkedList<>();
			stack.add(arr[0]);

			int i = 1;
			while (i < arr.length) {
				String time = arr[i++];
				String top = stack.getLast();

				if (top.equals(time) || !top.substring(0, 19).equals(time.substring(0, 19))) {
					stack.add(time);
				}
			}

			return stack.size();
		}
	}